Ext.define('PJ.view.submittrainingplanviews.PlanAllPlacesList', {
    extend: 'AM.default.DefaultList',
    alias: ['widget.stpvPlanAllPlacesList'],
    requires: ['AM.default.DefaultSearchForm',
               'AM.default.jsonp.DefaultLoadJsonp'//jsonp加载数据
               ],
   selModel: {
       selType: '',
       // 设置为只能通过复选框选中行
       checkOnly: true
   },
   isHavePage: false,
    initComponent: function(){
        var me = this;
        me.columns = [{
            header: '培训班名称',
            dataIndex: 'contrastClassName',
            flex: 1,
            minWidth:180,
            align:"center",
            renderer: function(value, meta, record){
            	meta.tdAttr = "data-qtip='" + value + "'";
            	return value;
            }
        }, {
            header: '计划市级人数',
            dataIndex: 'contrastCityValue',
            width:90,
            align:"center",
            renderer: function(value, meta, record){
            	meta.tdAttr = "data-qtip='" + value + "'";
            	return value;
            }
        },{
            header: '计划县级人数',
            dataIndex: 'contrastCountyValue',
            width:90,
            align:"center",
            renderer: function(value, meta, record){
            	meta.tdAttr = "data-qtip='" + value + "'";
            	return value;
            }
        },{
            header: '计划总人数',
            dataIndex: 'contrastCountValue',
            width:90,
            align:"center",
            renderer: function(value, meta, record){
            	meta.tdAttr = "data-qtip='" + value + "'";
            	return value;
            }
        }];
        me.store = Ext.create('PJ.' + prototype + '.submittrainingplanviews.PlanAllPlacesList', {
            isLoad: false
        });
        me.loadType = gj_onlineLearning_constant.loadType;
        me.callParent(arguments);
    },

    listeners: {
        viewready: function(){
        	var me = this;
            // 触发权限过滤事件
            this.fireEvent("permission", this);
            var store = this.store;
            var params = store.proxy.extraParams;
            var newParams = {
            		searchApplyNums:me.up('window').applyNums,
            		searchApplyPlan: 1
            };
            Ext.apply(params, newParams);
            store.isLoad = true;
            store.pageSize = -1;
            store.load();
        },
        afterrender: function(){
            this.loadMask = new Ext.LoadMask(this, {
                msg: "正在加载中,请稍后...."
            });
        }
    }
});
